[WC-3334] Fix DG2 export type bugs#2182
Conversation
b804adb to
05d8784
Compare
05d8784 to
bc6c7a0
Compare
08b3fd2 to
66ebfc8
Compare
AI Code Review
What was reviewed
Skipped (out of scope): Findings🔶 Medium —
|
4e8b769 to
f494395
Compare
AI Code Review
What was reviewed
Skipped (out of scope): Findings
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Documents current behavior of attribute, dynamicText, and customContent readers before bug-fix changes are applied. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…number Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…digits Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove "b" from ExcelCell.t union and boolean from ExcelCell.v since excelBoolean now returns string cells. Fix misleading test name for undefined dynamicText case. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add overloads to excelDate so t:"d" is only produced when v is a Date, preventing invalid SheetJS cells. Remove dead plain-number branch in attribute reader (Mendix always returns Big for numeric types). Drop no-op getCellFormat call in dynamicText reader (pre-rendered strings have no raw typed value to coerce). Remove redundant `?? undefined` in excelString. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
f494395 to
5aef9f2
Compare
AI Code Review
What was reviewed
Skipped (out of scope): Findings🔶 Medium — Whitespace-only strings silently export as the number 0File: if (props.exportType === "number" && value.trim() !== "") {
const parsed = Number(value);
if (!Number.isNaN(parsed)) {
return excelNumber(parsed, format);
}
}A companion test: it("falls back to string for whitespace-only value with number exportType", () => {
const col = column("Ws", c => {
c.showContentAs = "customContent";
c.exportValue = listExpression(() => " ");
c.exportType = "number";
});
const cell = readSingleCell(col);
expect(cell.t).toBe("s");
expect(cell.v).toBe(" ");
});
|
Pull request type
Refactoring (e.g. file rename, variable rename, etc.)
Bug fix (non-breaking change which fixes an issue)
Description
Fix multiple data export bugs in DataGrid2's Excel export feature (WC-3334).
Problems
Changes
fallback on parse failure